<?php

namespace common\models\datas;

use Yii;

/**
 * This is the model class for table "dmd_cards_attr".
 *
 * @property integer $id
 * @property integer $site_id
 * @property integer $card_id
 * @property integer $batch_id
 * @property string $card_no
 * @property string $v_code
 * @property integer $customer_id
 * @property integer $active_time
 * @property integer $issuser_id
 * @property integer $reissuser_id
 * @property integer $sendtype
 * @property integer $scholarship
 * @property string $cash
 * @property integer $status
 * @property integer $created_at
 * @property integer $updated_at
 * @property integer $is_delete
 */
class CardsAttr extends \common\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dmd_cards_attr';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['site_id', 'card_id', 'batch_id','send_id', 'customer_id', 'active_time', 'issuser_id', 'reissuser_id', 'sendtype', 'integral', 'status', 'created_at', 'updated_at', 'is_delete'], 'integer'],
            [['cash'], 'number'],
            [['card_no'], 'string', 'max' => 50],
            [['v_code'], 'string', 'max' => 60],
            [['salesman'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('common', '编号'),
            'site_id' => Yii::t('common', '分店id'),
            'card_id' => Yii::t('common', '卡号id'),
            'batch_id' => Yii::t('common', '批次id'),
            'send_id'=>Yii::t('common', 'card_send id'),
            'card_no' => Yii::t('common', '卡号'),
            'v_code' => Yii::t('common', '激活码'),
            'customer_id' => Yii::t('common', '用户id'),
            'active_time' => Yii::t('common', '激活时间'),
            'issuser_id' => Yii::t('common', '发卡人id'),
            'reissuser_id' => Yii::t('common', '二级发卡人id'),
            'salesman'=>Yii::t('common', '三级发卡人'),
            'sendtype' => Yii::t('common', '发卡类型 0:实体卡 1:虚拟卡 2推荐卡'),
            'integral' => Yii::t('common', '包含得奖学金'),
            'cash' => Yii::t('common', '现金'),
            'status' => Yii::t('common', '状态 0:默认未激活 1:激活'),
            'created_at' => Yii::t('common', '创建时间'),
            'updated_at' => Yii::t('common', '更新时间'),
            'is_delete' => Yii::t('common', '是否删除 0:默认未删除 1:删除'),
        ];
    }
}
